class pai{
    public static void main(String[] args) {
        double pai=0;
        double fenzi=4;
        double fenmu=1;
        for(int i=0;i<1000000000;i++){
            pai +=(fenzi/fenmu);
            fenzi*=-1.0;
            fenmu+=2.0;

        }
        System.out.println(pai);
    }
}